MyPDFView has a capability of showing PDF in multipage mode.  This is a brief explanation of how it works (omitting a lot of details).  Multipage and Double Multipage mode are explained first and Two page mode will be mentioned later.  

Setup:
"setupForPDFRep:style:" does the basic set up for PDFImageRep. In View's coordinate, Multipage mode defines a rect which consists of vertical row of pages, Double Multipage mode defines an [(n+1)/2] by 2 matrix (n = number of pages) of pages, together with vertical horizontal spaces inbetween.  pageWidth, pageHeight are the size of each page (they are supposed to have the same size).  totalPageWidth and totalPageHeight are defined by the rectangle occupied by all the pages.  The view's bounds has size totalPageWidth times totalPageHeight, unless there are extra spaces on the side of pages or above and below pages (within visibleRect), in which case, it will be enlarged accroding the available spaces.  
These basic dimensions are set up in "setupForPDFRep:style:".  Then it calls "fitToSize", which adjusts the magnification according to the fitting options (Fit to Width etc.) and calls "setFrameAndBounds" or "setMagnification:" in order to center the page when there is enough within visibleRect, or in order to set the magnification.  If the view already had a PDFImageRep, old positions are remembered and after setting is done, these position will be restored.  If the new PDFImageRep has approximately the same size as the old one, some of the steps will be omitted.  

How drawing is done:
There are two utility functions "pageNumberForPoint:" and "pointForPage:".  The former decide the page for a given point in the view's coordinate, the latter returns the origin of the rect corresponding to the page of given page number.  
When "drawRect:" is called, it first calls "pageNumberForPoint:" for upper left corner and lower right corner of the given rect, and determines the range of pages to be drawn.  For each page number within this range, "pointForPage:" is called to give the origin of drawing for that page, then NSPDFImageRep's method "drawAtPoint:" will be called after the correct page is set for NSPDFImageRep by "setCurrentPage:".  

Page number and scrolling:
In multipage mode, the "page" (which is to be displayed in the page number field) is ambiguous.  In principle, it is calculated by "pageNumberForPoint:" for the center of visibleRect.  It should be updated when the view scrolled.  How de we know that the view is being scrolled?  Upon scroll, the view receives NSViewBoundsDidChangeNotification from its super view (clip view) via its method "wasScrolled:".  "wasScrolled:" then calls "updateCurrentPage", which does two things: one is to update the page number field using "pageNumberForPoint:" for visibleRect's center.  The second is to move the small (yellow) window showing page number near the scroller's knob and display the page number correctly.  
In order to do this, the pdf view must register for notification (done in "windowControllerDidLoadNib" in MyDocument) and the clip view should be set to send notification by ([[self superview] setPostsBoundsChangedNotifications: YES], self = pdfview).  This one was what I was not doing properly.  The small page number window is created in MyWindow's "sendEvent:", which traps mouseDown event and checks if it is in vertical scroller's knob.  

Moving:
Moving between pages is done through "displayPage:", which scrolls the view to the desired page and calls "updateCurrentPage" for page number field.  

Two page mode:
Two page mode uses a trick to display only (at most) two pages at a time.  It uses the "page" of PDFImageRep as a part of memory.  In view's coordinate, it only occupies the space for two pages.  When "pointForPage:" is called, PDFImageRep is set to that page.  When "pageNumberForPoint:" is called, it returns only that page or its pair page.  (Now it correctly works.)  Therefore in "drawRect:", only the two pair pages are drawn.   
To move to another page by "displayPage:", first set the page for PDFImageRep via "pointForPage:" then scroll the view according to the returned base point.  

Left and right arrow keys:
Left and right arrow KEYS are connected to "left:" and "right:" via "sendEvent:" of "MyWindow", whereas Previous and Next page BUTTONS in toolbar are connected directly to "previousPage:" and "nextPage:".  
"right:" has the following function.  In multipage mode, it scrolls down with a small overlap.  In Two page and Double multipage modes, it first tries to scroll to right and if it fails then it does the same thing as in multiage mode.  "left:" is similar with opposite direction.  